<?php

checkUserPage($USER);

if($_POST['edituser'] == 'edit')
{  require_once  __CFG_PATH_LIBS . __CFG_PATH_CORE."mail.php";
  makeUserEdit($Errors);
  if(isEmptyArr($Errors))
  {  	go_to(getPath().$CONFIG['UserPage'].$CONFIG['webPageFileType']);
  	exit;
  }
}



$tpl->assign("User", $USER);

$ErrorMessages = array();
foreach($Errors as $n => $error)
{
  $ErrorMessages[] = $ERRORS['user'][$error];
}
$tpl->assign("ErrorMessages", $ErrorMessages);

$tpl->assign("PageTitle", $USER['info']['firstname']." ".$USER['info']['lastname']);

$_BODY_SMARTY_TEMPLATE = $CONFIG['ModulesFolder']."module.user.tpl";

?>